package ihm;

import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JTabbedPane;

import elubrication.MumWindow;

public abstract class AbstractModule extends Container {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private MumWindow _mainFrame;
	
	protected MumWindow getMainFrame() {
		return this._mainFrame;
	}
	
	public AbstractModule(MumWindow mainFrame) {
		
		this._mainFrame = mainFrame;
		
		setLayout(new BorderLayout(5, 5));
		
		add(getBarreOutil(), BorderLayout.NORTH);
		add(getBarreLaterale(), BorderLayout.WEST);
		add(getCadrePrincipal(), BorderLayout.CENTER);
	}
	
	protected abstract BarreOutil getBarreOutil();
	protected abstract JTabbedPane getCadrePrincipal();
	
	protected BarreOutil getBarreLaterale() {
		return new BarreOutilLaterale(this._mainFrame);
	}
}
